package com.practice.library.Controller;

import com.practice.library.Model.BookInfo;
import com.practice.library.Service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/book")
@RestController
public class BookController {
    @Autowired
    private BookService bookService;
    @RequestMapping("/getList")
    public List<BookInfo> getList(){
      //  BookService bookService=new BookService();
        List<BookInfo> bookInfos=bookService.getList();
        return  bookInfos;
    }

}
